package company.C360;

import java.util.Scanner;

public class C1 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        int count = 0;
        loop1:
        for (int i = 0; i < n; i++) {
            String s = sc.nextLine();
            if (s.length() <= 10) {
                char[] chars = s.toCharArray();
                for (char c : chars) {
                    if (c >= 'a' && c <= 'z')
                        continue;
                    else if (c >= 'A' && c <= 'Z')
                        continue;
                    else
                        continue loop1;
                }
                count++;
            }
        }
        System.out.println(count);
    }
}
